<#compress>
    <#assign actionname>${(action=='create')?string('新建','编辑')}</#assign>
    <@override name="title">${actionname}车位</@override>
    <@override name="viewbody">
    <div class="row">
        <div class="col-md-12">
            <h3 class="page-title">
            ${actionname}车位
                <small>${actionname}车位.</small>
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="${ctx}/admin/home">
                        首页
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="${ctx}/admin/parking">
                        车位管理
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">
                    ${actionname}车位
                    </a>
                </li>
            </ul>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading"><h6 class="panel-title">车位信息</h6></div>
        <div class="panel-body">
            <form class="form-horizontal" action="${ctx}/admin/parking/save" role="form" id="parkingForm" method="post">
                <input name="parking.id" type="hidden" value="${parking.id!}"/>

                <div class="form-group">
                    <label class="col-sm-2 control-label" for="parkingName">车位标识: <span
                            class="required">*</span></label>

                    <div class="col-sm-10">
                        <input type="text" class="required form-control input-xlarge" placeholder="车位标识"
                               name="parking.mark" id="parkingName" value="${parking.mark!}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="parkingLocation">车位位置: <span
                            class="required">*</span></label>

                    <div class="col-sm-10">
                        <input type="text" class="required form-control input-xlarge" placeholder="车位位置"
                               name="parking.location" id="parkingLocation" value="${parking.location!}">
                    </div>
                </div>
                <#--<div class="form-group">-->
                    <#--<label class="col-sm-2 control-label" for="parkingArea">车位区号:</label>-->

                    <#--<div class="col-sm-10">-->
                        <#--<input type="text" class="required form-control input-xlarge" placeholder="车位位置"-->
                               <#--name="parking.area" id="parkingArea" value="${parking.area!}">-->
                    <#--</div>-->
                <#--</div>-->
                <#--<div class="form-group">-->
                    <#--<label class="col-sm-2 control-label" for="description">车位描述:</label>-->

                    <#--<div class="col-sm-10">-->
                        <#--<textarea rows="5" cols="5" id="description" class="limited form-control input-xlarge"-->
                                  <#--name="parking.description"-->
                                  <#--placeholder="请输入车位描述">${parking.desciption!}</textarea>-->
                        <#--<span class="help-block" id="limit-text">最多120个字符.</span>-->
                    <#--</div>-->
                <#--</div>-->
            <#-- todo floor with mall-->
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="parking_floor">所属楼层: </label>

                    <div class="col-sm-10">
                        <select data-placeholder="选择楼层" name="parking.floor" id="parking_floor"
                                class="required form-control input-xlarge select2me">
                            <option value=""></option>
                            <#if floors??>
                                <#list floors as item>
                                    <option value="${item.id}"
                                            <#if parking.floor?? && parking.floor == item.id>selected="selected"</#if> >${item.name}</option>
                                </#list>
                            </#if>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="parking_mall">所属购物中心: </label>

                    <div class="col-sm-10">
                        <select data-placeholder="选择购物中心" name="parking.mall" id="parking_mall"
                                class="required form-control input-xlarge select2me">
                            <#if mallblock??>
                                <#list mallblock as mb>
                                    <option value="${mb.id}"
                                            <#if parking.mall?? && parking.mall == mb.id>selected="selected"</#if> >${mb.name}
                                        --${mb.blockname}</option>
                                </#list>
                            </#if>
                        </select>
                        <span class="help-block" id="malldesc">购物中心--所属集团.</span>
                    </div>
                </div>



                <div class="form-actions text-right">

                    <a class="btn default yellow-stripe" href="${ctx}/admin/parking"><i
                            class="fa fa-arrow-circle-o-left"></i> 返回</a>
                    <input type="submit" value="保存" class="btn btn-primary">
                </div>

            </form>
        </div>

    </div>
    </@override>

    <@override name="viewmodule">parking_item</@override>
    <@extends name="../_basic/main.ftl"></@extends>
</#compress>